<?php

namespace App\Models\customer;

use App\Models\AdminModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model as BaseModel;


class TrajectoryNodeModel extends BaseModel
{
    use HasFactory, SoftDeletes;

    protected $table = 't_sop_trajectory_node';

    protected $primaryKey = 'id';

    public $timestamps = true;

    const CREATED_AT = 'created_at';
    
    const UPDATED_AT = null;

    const UNIT = [1 => '分钟', 2 => '小时'];

    protected $guarded = [];

    protected $hidden = [
        'deleted_at',
    ];


    //节点
    public function node(): BelongsTo {
        return $this->belongsTo(NodeModel::class, 'node_id');
    }
    
}
